package com.tt.dp.proxy.javaimpl;

import java.lang.reflect.Proxy;

public class ProxyUtil {

    public PersonBean getOwnerProxy(PersonBean personBean){

        return (PersonBean) Proxy.newProxyInstance(
                personBean.getClass().getClassLoader(),
                personBean.getClass().getInterfaces(),
                new OwnerInvocationHandler(personBean)
        );
    }
}
